package cn.lizemin.demo.enum02;

/**
 * @author: lizemin
 * @version: 1.0
 */
public enum Season {
    SPRING("春天","春暖花开"){
        @Override
        public Season getNextSeason() {
            return SUMMER;
        }
    },
    SUMMER("夏天","烈日炎炎"){
        @Override
        public Season getNextSeason() {
            return AUTUMN;
        }
    },
    AUTUMN("秋天","秋高气爽"){
        @Override
        public Season getNextSeason() {
            return WINTER;
        }
    },
    WINTER("冬天","冰天雪地"){
        @Override
        public Season getNextSeason() {
            return SPRING;
        }
    };

    private String seasonName;
    private String seasonDesc;

    Season(String seasonName,String seasonDesc){
        this.seasonName = seasonName;
        this.seasonDesc = seasonDesc;
    }

    public String getSeasonDesc() {
        return seasonDesc;
    }

    public String getSeasonName() {
        return seasonName;
    }

    //抽象方法
    public abstract Season getNextSeason();

    @Override
    public String toString() {
        return "Season{" +
                "seasonName='" + seasonName + '\'' +
                ", seasonDesc='" + seasonDesc + '\'' +
                '}';
    }


}
